home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / IDLIncludes / SpeechRecognition.idl < prev    next >
Text File  |  1996-05-01  |  5KB  |  129 lines

  1. /*
  2.      File:        SpeechRecognition.idl
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __SPEECHRECOGNITION_IDL__
  19. #define __SPEECHRECOGNITION_IDL__
  20.  
  21. #include <somobj.idl>
  22. #include <somcls.idl>
  23.  
  24. #ifndef __MEMORY_IDL__
  25. #include <Memory.idl>
  26. #endif
  27.  
  28. #ifdef __SOMIDL__
  29.  
  30. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  31. /* Error Codes [Speech recognition gets -5100 through -5199] */
  32. /* Type Definitions */
  33. typedef OpaquePtr                SRSpeechObject;
  34.  
  35. typedef SRSpeechObject            SRRecognitionSystem;
  36.  
  37. typedef SRSpeechObject            SRRecognizer;
  38.  
  39. typedef SRSpeechObject            SRSpeechSource;
  40.  
  41. typedef SRSpeechSource            SRRecognitionResult;
  42.  
  43. typedef SRSpeechObject            SRLanguageObject;
  44.  
  45. typedef SRLanguageObject        SRLanguageModel;
  46.  
  47. typedef SRLanguageObject        SRPath;
  48.  
  49. typedef SRLanguageObject        SRPhrase;
  50.  
  51. typedef SRLanguageObject        SRWord;
  52.  
  53. /* between 0 and 100 */
  54. typedef unsigned short            SRSpeedSetting;
  55.  
  56. /* between 0 and 100 */
  57. typedef unsigned short            SRRejectionLevel;
  58.  
  59. /* When an event occurs, the user supplied proc will be called with a pointer    */
  60. /*    to the param passed in and a flag to indicate conditions such                */
  61. /*    as interrupt time or system background time.                                */
  62. typedef SOMLargeStruct            SRCallBackStruct;            /* Derived from a struct of 20 bytes in size */
  63.  
  64. /* Call back procedure definition */
  65. typedef OpaquePtr SRCallBackProcPtr;
  66. typedef OpaquePtr SRCallBackUPP;
  67. typedef SOMLargeStruct            SRCallBackParam;            /* Derived from a struct of 8 bytes in size */
  68.  
  69. /* Recognition System Types */
  70. /* Recognition System Properties */
  71. /* Speech Source Types */
  72. /* Notification via Apple Event or Callback */
  73. /* Notification Flags */
  74. /* Apple Event selectors */
  75. /* AppleEvent message class  */
  76. /* AppleEvent message event ids */
  77. /* AppleEvent Parameter ids */
  78. /* AppleEvent Parameter types */
  79. /* SRRecognizer Properties */
  80. /* 0 means more accurate but slower. */
  81. /* 100 means (much) less accurate but faster. */
  82. /* Operational Status Flags */
  83. /* Recognition Result Properties */
  84. /* SRLanguageObject Family Properties */
  85. /* LM Object Types -- returned as kSRLMObjType property of language model objects */
  86. /* a normal and reasonable rejection level */
  87. /********************************************************************************/
  88. /*                        NOTES ON USING THE API                                    */
  89. /*                                                                                */
  90. /*        All operations (with the exception of SRGetRecognitionSystem) are        */
  91. /*        directed toward an object allocated or begot from New, Get and Read        */
  92. /*        type calls.                                                                */
  93. /*                                                                                */
  94. /*        There is a simple rule in dealing with allocation and disposal:            */
  95. /*                                                                                */
  96. /*        *    all toolbox allocations are obtained from a SRRecognitionSystem        */
  97. /*                                                                                */
  98. /*        *    if you obtain an object via New or Get, then you own a reference     */
  99. /*            to that object and it must be released via SRReleaseObject when        */
  100. /*            you no longer need it                                                */
  101. /*                                                                                */
  102. /*        *    when you receive a SRRecognitionResult object via AppleEvent or        */
  103. /*            callback, it has essentially been created on your behalf and so        */
  104. /*            you are responsible for releasing it as above                        */
  105. /*                                                                                */
  106. /*        *    when you close a SRRecognitionSystem, all remaining objects which        */
  107. /*            were allocated with it will be forcefully released and any            */
  108. /*            remaining references to those objects will be invalid.                */
  109. /*                                                                                */
  110. /*        This translates into a very simple guideline:                            */
  111. /*            If you allocate it or have it allocated for you, you must release    */
  112. /*            it.  If you are only peeking at it, then don't release it.            */
  113. /*                                                                                */
  114. /********************************************************************************/
  115. /* Opening and Closing of the SRRecognitionSystem */
  116. /* Accessing Properties of any Speech Object */
  117. /* Any object obtained via New or Get type calls must be released */
  118. /* SRRecognizer Instance Functions */
  119. /* Language Model Building and Manipulation Functions */
  120. /* Operations on any object of the SRLanguageObject family */
  121. /* Traversing SRRecognitionResults or SRLanguageObjects */
  122. /* Utilizing the System Feedback Window */
  123. #endif
  124.  
  125. #endif /* __SOMIDL__ */
  126.  
  127. #endif /* __SPEECHRECOGNITION_IDL__ */
  128.  
  129.